import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const Home = (resolve) => require(["@/views/Home"], resolve);
const commonIndex = (resolve) =>
  require(["@/components/common"], resolve);
const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
    meta: {
      title: "主页",
    },
  },
  {
    path: "/commonIndex",
    name: "commonIndex",
    component: commonIndex,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
